#include<bits/stdc++.h>
using namespace std;
int a[100005],b[100005];
string c[100005];
int main()
{
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    int n,m,x,y,t,k;
    srand(time(0));
    cin>>n>>m;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    for(int i=1;i<=m;i++)
        cin>>b[i];
        cin>>x;
        cin>>y;
        cin>>t;
        cin>>k;
        for(int i=1;i<=t;i++)
            cin>>c[i];
        for(int i=1;i<=t;i++)
        {
            cout<<rand()<<endl;
        }
    return 0;
}
